package com.nwork.cateye.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.nwork.cateye.Constants;


/**
 * 数据库的操作类
 */
public class DBHelper extends SQLiteOpenHelper {
    private String createCityTable =
            "create table " + Constants.CITY_TABLE +
                    "(_id integer primary key autoincrement," +
                    "provence_name text not null," +
                    "city_name text not null," +
                    "city_code text not null," +
                    "LatLng text )";


    public DBHelper(Context context) {
        super(context, Constants.DB_NAME, null, Constants.DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(createCityTable);

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
